This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 11-373072, filed Dec. 28, 1999, the entire contents of which are incorporated herein by reference.
Then present invention relates to a disk control device provided with a disk cache mechanism, used in a computer system, and especially a disk control device for improving the disk cache hit rate during data readout by performing disk cache pre-fetch efficiently, prior to data readout access.
A disk memory device composed of magnetic disk device or the like is usually provided with disk cache mechanism (disk cache) composed of semi-conductor memory (including disk cache memory) for speeding up read/write.
Especially, a RAID (Redundant Array of Inexpensive Disks) device using a plurality of disk devices (disk drives) has often large capacity cache memory mounted.
Howsoever, in many cases, disk cache has an effect to speed up apparently writing from the host computer (host device) as data write buffer, whilst its speeding up effect is small in data readout. This is because the cache hit rate is low, as readout access to a disk memory device is often not localized.
Hit rate can be improved by performing pre-fetch from disk device to cache memory, prior to data readout access. However, in practice, it is impossible to confirm from where to pre-fetch. Thus, conventionally, pre-fetch has been performed supposing sequential readout.
As mentioned above, in conventional disk memory device provided with disk cache, pre-fetch has been performed supposing sequential readout.
Nonetheless, in fact, data readout access from a host computer to a disk memory device is not always sequential. Viewed from the host computer side, it is actually by file, table search, readout of a set of several files, or other correlations may be revealed, but the disk memory device side treats them simply as random access, because these patterns can no be recognized.
Therefore, conventionally, pre-fetch to disk cache had effect only in limited cases, and sometime it had no effect at all.
The present invention has been made considering the situation mentioned above and has an object to provide a disk control device for improving the disk cache hit rate, by performing disk cache pre-fetch efficiently using access history.
In the present invention, a disk cache control device provided with a disk cache for temporarily storing a part of data on a disk device comprises a readout access history table for storing history of readout access given be a host device, readout access execution means for transferring accessed data to the host device using the disk cache when a readout access is given from the host device, registration means for registering corresponding readout access history information in the readout access history table linking with previous readout access history information based on the readout access given from the host device, and pre-fetch means for predicting the following readout access contents from the readout access given from the host device and the readout access history stored in the readout access history table, and pre-fetching the concerned data from the disk device to the disk cache, if concerned data does not exist in the disk cache.
Such configuration allows to record data readout access history in the readout access history table, to pre-fetch effectively by predicting the following access using the data readout access history when a data readout access is accepted, and to improve the disk cache hit rate.
Here, if well-known sequential pre-fetch means for sequentially pre-fetching following data to the data requested by a readout access given from the host device is added, and pre-fetch by this sequential pre-fetch means and a novel pre-fetch by the pre-fetch means are used in combination, the disk cache hit rate can be improved further.
Besides, as for data structure of the readout access history table, a data structure for storing respective readout access in a history information set format including the corresponding readout access history information as a first readout access history information, and readout access history information of the following readout access as a second readout access history information, may be applied. In this case, the pre-fetch means may pre-fetch according to the second readout access history information among history information sets taking the readout access history information corresponding to the readout access given from the host device as the first readout access history information. Here, accessed address information indicating access destination may be used as readout access history information corresponding to the readout access. The readout access history table data structure of this case is called the first data structure.
Moreover, in the configuration mentioned above, the registration means may be provided with new registration means and modification registration means, and such configuration that, when a readout access is given from the host device and no history information set including the first readout access history information corresponding to a previous readout access exist in the readout access history table, a history information set including the first readout access history information corresponding to the previous readout access, and a history information set including the second readout access history information corresponding to the given readout access are newly registered in the readout access history table, while, if a history information set including the first readout access history information corresponding to a previous readout access exists in the readout access history table and, at least, the second readout access history information corresponding to the given readout access is not included in the concerned history information set, the second readout access history information in the concerned history information set is modified into the second readout access history information corresponding to the given readout access may be applied.
In addition, as readout access history table data structure, in place of the first data structure, a second data structure for storing respective readout access in a history information set format including a predetermined address portion whose predetermined unit area can be designated in an access destination address information indicated by the concerned access as the first readout access history information, and the concerned access destination address information of the first readout access showing an access destination address information different from the concerned access in predetermined address portion after the concerned access as the second readout access history information may be applied. In this case, the pre-fetch means may pre-fetch according to the second readout access history information among history information sets taking the predetermined address portion of the access destination address information indicated by the readout access given from the host device as the first readout access history information.
Here, such configuration that, when a readout access whose predetermined address portion of the access destination address information is different from the previous one is given from the host device and no history information set including the first readout access history information corresponding to a previous readout access exist, a history information set including the first readout access history information corresponding to the previous readout access, and the second readout access history information corresponding to the given readout access are newly registered, while, if a history information set including the first readout access history information corresponding to a previous readout access exists and, at least, the second readout access history information corresponding to the given readout access is not included in the concerned history information set, the second readout access history information in the concerned history information set is modified into the second readout access history information corresponding to the given readout access may be applied.
In the configuration using the readout access history table of the second data structure, the readout access history table size can be compressed, as registration to the readout access history table is suppressed for readout access becoming sequential readout to the previous readout access.
Additionally, as readout access history table data structure, a third data structure for storing respective readout access in a history information set format taking the access destination address information indicated by the concerned access as the first readout access history information, and the access destination address information indicated by the first readout access out of the sequential readout beginning from the access destination address information indicated by the concerned access after the concerned access as the second readout access history information, and including information on continuous access number in the sequential readout may more preferably be applied. In this case, the pre-fetch means may pre-fetch according to the second readout access history information among history information sets taking the predetermined address portion of the access destination address information indicated by the readout access given from the host device as the first readout access history information, and corresponding continuous access number.
Here, such configuration that, when a readout access out of sequential readout is given from the host device and no history information set including the first readout access history information corresponding to a previous readout access which is a readout access indicating the access destination address information of the concerned sequential readout exist in the readout access history table, a history information set including the first readout access history information corresponding to the previous readout access, the second readout access history information corresponding to the given readout access, and continuous access number information in the concerned sequential readout is newly registered, while, if a history information set including the first readout access history information corresponding to a previous readout access exists and, at least, the second readout access history information corresponding to the given readout access is not included in the concerned history information set, the second readout access history information in the concerned history information set is modified into the second readout access history information corresponding to the given readout access, and continuous access number information in the concerned history information set is modified into continuous access number information of the concerned sequential readout may be applied.
In the configuration using the readout access history table of the third data structure, it is possible to prevent useless pre-fetch from generating and to realize an efficient pre-fetch, because pre-fetch by the pre-fetch means can be performed according to the second readout access history information in a history information set taking the destination address information indicated by the readout access given from the host device as the first readout access history information, and the corresponding continuous access number. Moreover, when sequential pre-fetch is used at the same time, an effective sequential pre-fetch can be realized, because data following the data accessed by a readout access given from the host device can be sequentially pre-fetched according to the continuous access number information stored in readout access history table making a set with the first readout access history information corresponding to the concerned previous readout access.
If a fourth data structure allowing to register a plurality of second access history information, in accordance with the first readout access history information is used in place of the third data instruction, the disk cache hit rate can be further improved because pre-fetch can be performed respectively according to the plurality of second access history information and the corresponding continuous access number.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.